#pragma once
#include "DXAMLCommon.h"
#include "CDependencyObject.h"

class CApplication;
class CContentControl;


class CDeployment :
	public CDependencyObject
{

private: 
	CDeployment(CCoreServices * pCore);
protected: 
	virtual ~CDeployment();
public: 
	static HRESULT Create(CDependencyObject * * ppObject, CREATEPARAMETERS * pCreate);
	virtual XUINT32 GetTypeIndex() const;
	virtual XUINT32 AddRef();
	virtual XUINT32 Release();
	HRESULT Start();
	HRESULT Complete();
	HRESULT JupiterComplete(CApplication * pApplication);
	HRESULT DownloadComplete();
	HRESULT StartupEventComplete();
	CDependencyObject * GetDownloadVisual();
	HRESULT SetCurrentApplication(CApplication * pApplication);
	HRESULT CheckRuntimeVersion(XUINT32 bPromptForUpdate);
	HRESULT GetRuntimeVersion(XUINT32 * puMajorVersion, XUINT32 * puMinorVersion, XUINT32 * puBuildNumber, XUINT32 * puRevisionNumber);
	void Exit();
	CApplication * GetApplicationObjectForResourceLookup();
	HRESULT SetTempApplicationObjectForResourceLookup(CApplication * pApp);
	CXString * m_pstrEntryPointAssembly;
	CXString * m_pstrEntryPointType;
	CXString * m_pRuntimeVersion;
	XUINT32 m_fStarted;
	CApplication * m_pApplication;
	enum XDomainAccess m_eAllowExternalCallersFromXDomain;
	CUIElement * m_pTempRootVisual;
	CContentControl * m_pTempRootScrollViewer;
private: 
	XUINT32 m_uMajorVersion;
	XUINT32 m_uMinorVersion;
	XUINT32 m_uBuildNumber;
	XUINT32 m_uRevisionNumber;
	CApplication * m_pTempApplicationForResourceLookup;
};